<?php

#doc
#	classname:	Job
#	scope:		PUBLIC
#
#/doc

class Job extends Model
{
	#	internal variables
	var $attributes = array(
	array('id','INT NOT NULL AUTO_INCREMENT PRIMARY KEY'),
	array('name','VARCHAR(255)'),
	array('description','VARCHAR(255)')
	);

	var $table = 'job';
	var $hasMany = 'Booking';

	#	Constructor
	function __construct (  )
	{
		# code...
	}
	###

	public function listAll ()
	{
		# code...
	}

	public function getBookings(){
		Classloader::getInstance()->loadModel("Booking");
		$booking = new Booking();
		$bookings = $booking->findAllWhere("job_id = ".$this->id);
		return $bookings;
	}

}
###

?>